<@_taskTemplateContent path=path><#assign template=object!/></@_taskTemplateContent>
<form method="post" autocomplete="off" action="taskTemplate/save?navTabId=taskTemplate/list" class="pageForm required-validate" onsubmit="return validateCallback(this, navTabAjaxDone);">
    <input type="hidden" name="_csrf" value="<@_csrfToken admin=true/>"/>
    <div class="formBar">
        <ul>
        <#if template?has_content>
            <li><a class="button" href="taskTemplate/delete?path=${path?url}&navTabId=taskTemplate/list&_csrf=<@_csrfToken admin=true/>" title="<@t.page 'confirm.delete_file'/>" target="ajaxTodo"><i class="icon-trash icon-large"></i> <@t.page 'button.delete'/></a></li>
        </#if>
            <@_createLock itemType='taskTemplate' itemId=path userId=admin.id>
                <#if object?has_content||!path?has_content>
            <li><button type="submit" class="buttonActive" title="ctrl+s"<#if path?has_content> close-url="common/unlock?itemType=taskTemplate&itemId=${(path?url)!}"</#if>><@t.page 'button.save'/></button></li>
                <#else>
            <li>
                <@_sysLock userId=admin.id itemType='taskTemplate' itemId=path>
                    <@_sysUser id=(object.userId)!''><#assign lockUser=object.nickName/></@_sysUser>
                <button type="button" class="buttonDisabled" title="${object.createDate}"><@t.page 'lock.message' lockUser/></button>
                </@_sysLock>
            </li>
                </#if>
            </@_createLock>
        </ul>
    </div>
    <h2 class="contentTitle">
         <a class="button" href="taskTemplate/chipLookup.html" target="dialog" mask="true"><@t.page 'task_template.fragment'/></a>
         <a class="button" href="cmsTemplate/help.html?type=task" target="dialog" mask="true"><@t.page 'template.help'/></a>
    </h2>
    <div class="pageFormContent" layoutH>
        <div class="clearfix">
            <label><@t.page 'path'/>:</label><input name="path" class="required" type="text" maxlength="50" size="50" value="${(path)!}"/>
        </div>
        <div class="exclude-translate">
            <textarea name="content" class="code" escape="true" mode="freemarkermixed">${(template)!}</textarea>
        </div>
    </div>
</form>